package homeWork;

import java.util.Calendar;
import java.util.Scanner;

public class test1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int i = sc.nextInt();
        Calendar instance = Calendar.getInstance();
        instance.set(i,2,1);
        instance.add(Calendar.DATE,-1);
        int i1 = instance.get(Calendar.DATE);
        if (i1==29){
            System.out.println("闰年");
        }else {
            System.out.println("平年");
        }

        int i2 = sc.nextInt();
        Calendar c1 = Calendar.getInstance();
        c1.set(i1,12,31);
        int i3 = c1.get(Calendar.DATE);
        if (i3==366){
            System.out.println("闰年");
        }else {
            System.out.println("平年");
        }
    }
}
